/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jteacher;

import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;

/**
 *
 * @author siddhu
 */
public class Swing {

    private JFrame frame;
    private JMenu menu;
    private JMenuBar menuBar;

    public Swing() {

	frame = new JFrame();
	menu = new JMenu("Menu");
	menuBar = new JMenuBar();

    }

    void gui() {
	frame.setVisible(true);
	frame.setJMenuBar(menuBar);
	frame.setPreferredSize(new Dimension(400, 400));
	frame.pack();

	menuBar.setPreferredSize(new Dimension(400, 20));
	menuBar.add(menu);
	JTextField text1= new JTextField(10);
	frame.add(text1);
    }

}